'use strict';

module.exports = {
    queryDeviceList: {
        request: () => {
            return {
                address: { type: 'string', required: false }
            };
        }
    },
    queryDevOnlineRecord: {
        request: () => {
            return {
                // devId ts stat
                devId: { type: 'string', required: false },
                startTs: { type: 'string', required: false },
                endTs: { type: 'string', required: false },
                stat: { type: 'int', required: false },
                pageSize: { type: 'number', required: true, min: 1 }, // 一页多少条
                pageIndex: { type: 'number', required: true, min: 1 } // 第几页
            };
        }
    },
    // 添加设备维修记录
    addDevRepairRecord: {
        request: () => {
            return {
                // devId ts stat
                devId: { type: 'string', required: true, allowEmpty: true }, // 设备编号
                repairReason: { type: 'string', required: true, allowEmpty: true }, // 维修原因
                repairResult: { type: 'string', required: true, allowEmpty: true } // 维修结果
            };
        }
    }
};
